using System;
using MoonFramework.Attribute;
using MoonFramework.Scripts.Pool;
using MoonFramework.Template;

namespace MoonFramework.Buff
{
    [Pool]
    public abstract class BaseBuff : IBuff
    {
        public BuffType BuffType { get; set; }
        public string BuffName { get; set; }
        public float BuffTime { get; set; }
        protected BuffFsm BuffFsm;
        
        protected void Init(BuffFsm buffFsm,BuffType buffType, string buffName, float buffTime)
        {
            BuffFsm = buffFsm;
            BuffType = buffType;
            BuffName = buffName;
            BuffTime = buffTime;
        }

        public virtual void Enter()
        {
        }

        public virtual void Exit()
        {
            ObjPoolManager.Instance.Push(this);
        }
    }
}